package com.botann.projects.constants;


import com.botann.projects.utils.DateUtils;

import java.util.Date;

/**
 * Charging
 * Constant
 * Created by 刘山国 on 2017/12/26.
 * Copyright (c) 2017 伯坦科技. All rights reserved
 */
public class Constant {
    public static final String SYSTEM_SUPER_ADMIN               = "系统超级管理员";
    public static final String SUPER_ADMIN                      = "超级管理员";
    public static final String ROLE_SYSTEM_SUPER_ADMIN          = "ROLE_SYSTEM_SUPER_ADMIN";        // 共一个系统超级管理员
    public static final String ROLE_PTB_ADMIN                   = "ROLE_PTB_ADMIN";                 // 平台部管理员
    public static final String ROLE_PTB_AND_SUPER_ADMIN         = "ROLE_PTB_AND_SUPER_ADMIN";       // 平台部管理员和所有超管
    public static final String ROLE_SUPER_ADMIN                 = "ROLE_SUPER_ADMIN";               // 所有超管
    public static final String ROLE_SITE_SUPER_ADMIN            = "ROLE_SITE_SUPER_ADMIN";          // 站点公司的超级管理员
    public static final String ROLE_SITE_ADMIN                  = "ROLE_SITE_ADMIN";                // 站点公司的管理员
    public static final String ROLE_CAR_SUPER_ADMIN             = "ROLE_CAR_SUPER_ADMIN";           // 车辆公司的超级管理员
    public static final String ROLE_CAR_ADMIN                   = "ROLE_CAR_ADMIN";                 // 车辆公司的管理员
    public static final String ROLE_ADMIN                       = "ROLE_ADMIN";                     // 所有管理员

    public static final Date BEGIN_DATE                         = DateUtils.targetDate("2018-05-01","yyyy-MM-dd");
    public static final Date END_DATE                           = DateUtils.targetDate("2100-01-01","yyyy-MM-dd");

    public static final Integer PAGE_INDEX                      = 0;
    public static final Integer PAGE_SIZE                       = 10;


    public static final Integer PROVINCE_PARENT_ID              = 100000;
    public static final Integer ONE_MILLION                     = 1000000;


    public static final String EMPTY                           = "";
    public static final String DO_SUCCESS                      = "操作成功!";
    public static final String UPDATE_SUCCESS                  = "更新成功!";
    public static final String ADD_SUCCESS                     = "添加成功!";
    public static final String BIND_SUCCESS                    = "绑定成功!";
    public static final String UNBIND_SUCCESS                  = "解绑成功!";
    public static final String SET_SUCCESS                     = "设置成功!";
    public static final String DELETE_SUCCESS                  = "删除成功!";
    public static final String SAVE_SUCCESS                    = "保存成功!";
    public static final String APPLY_SUCCESS                   = "申请成功!";
    public static final String RECHARGE_SUCCESS                = "充值成功!";
    public static final String SEND_SUCCESS                    = "发布成功!";
    public static final String EXPORT_SUCCESS                  = "导出成功!";

    public static final Integer kAdminId = 1;
    public static final Integer kSiteCompanyId = 3;
    public static final String kExcelDate = "excelDate";
    public static final String kTrueFalse = "true,false";
    public static final String k0To3 = "0,1,2,3";
    public static final String k0To2 = "0,1,2";
    public static final String k0To1 = "0,1";

    public static final String s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
    public static String randomStr(int len) {
        StringBuffer sb = new StringBuffer();
        for(int i=0;i<len;i++) {
            sb.append(s.charAt((int) (s.length() * Math.random())));
        }
        return  sb.toString();
    }
}
